package example.simple_mindmap.mapper;


import example.simple_mindmap.domain.po.SignUpKey;
import org.apache.ibatis.annotations.*;

@Mapper
public interface SignUpKeyMapper {
    //新增Key
    @Insert("insert into t_signup_key(uid,`key`) values (#{uid}, #{key})")
    int insertKey(SignUpKey signUpKey);

    //2.删除方案
    @Delete("delete from t_signup_key where id=#{id}")
    int deleteKey(@Param("id") long id);

    //获取key，根据key
    @Select("select * from t_signup_key where `key`=#{key}")
    SignUpKey selectOneByKey(@Param("key") String key);

    //修改Key
    @Update("update t_signup_key set uid=#{uid} where `key`=#{key}")
    int updateKey(SignUpKey signUpKey);
}